//引入封装的方法
import { httpGet,httpPost,httpPut,httpDelete,upload,fileView} from './utils/ajax';
// app.js
App({
  //小程序初始化加载的事件
  onLaunch() {
    const tokenName = wx.getStorageSync('tokenName');
    const token = wx.getStorageSync('token');
    if(!tokenName || token){
      //不存在本地token，就跳转登录页面
      // wx.reLaunch({
      //   url: '/pages/login/login',
      // })
    }
  },
  globalData: {
    userInfo: null
  },
  //将封装导入进来的方法进行挂载
  httpGet,
  httpPost,
  httpPut,
  httpDelete,
  upload,
  fileView
})
